package com.shengqin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 学生信息
 * </p>
 *
 * @author Rui.Zhou
 * @since 2023-12-05
 */
@TableName("t_student")
@Schema(name = "Student对象", description = "学生信息")
@Data
public class Student implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "学籍号")
    private String studyCode;

    @Schema(description = "姓名")
    private String name;

    @Schema(description = "身份证号")
    private String idNumber;

    @Schema(description = "出生日期")
    private LocalDate birthday;

    @Schema(description = "家庭地址")
    private String address;

    @Schema(description = "性别")
    private String sex;

    @Schema(description = "民族")
    private String nation;

    @Schema(description = "所属年级")
    private Integer gradeId;

    @Schema(description = "所属班级")
    private Integer classesId;

    @Schema(description = "班级名称")
    private String classesName;

    @Schema(description = "班级编码")
    private String classesCode;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private String createUserId;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "更新人")
    private String updateUser;

    @Schema(description = "卡号")
    private String cardNo;

    @Schema(description = "所属学校")
    private Integer schoolId;

    @Schema(description = "学生来源")
    private String fromSource;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "头像")
    private String avatarUrl;

    private Boolean graduateFlag;
    private String graduateYear;

    private String loginPassword;
    private Boolean isUpdatePwd = false;
    private String collegeName;

    @TableField(exist = false)
    private String schoolName;
    @TableField(exist = false)
    private String gradeName;
}
